home *** CD-ROM | disk | FTP | other *** search
- Path: news.uh.edu!usenet
- From: Sensarn <txs53132@bayou.uh.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: reading in integers and floats
- Date: 18 Feb 1996 03:22:18 GMT
- Organization: AEtna Insurance Agency
- Message-ID: <4g661a$s3q@masala.cc.uh.edu>
- References: <4g3cv9$88m@orion.cc.andrews.edu>
- NNTP-Posting-Host: sip-16658.public-dialups.uh.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
-
- For integers, use fgetc():
-
- FILE *fp
- int intvar;
- intvar=(unsigned char)fgetc(fp)<<8+(unsigned char)fgetc(fp);
-
-
- --
- |\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|
- Steven Sensarn -- txs53132@bayou.uh.edu
- |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|
-
-
-